|
|
|
|
|
|
|
If you double-click the Custom property in the Properties window of the ImageList control, youll see a form similar to the one shown in Figure 30.2. |
|
|
|
|
|
|
|
|
Figure 30.2
The property pages of the ImageList control. |
|
|
|
|
|
|
|
|
In Figure 30.2, you can see that Ive loaded flag images of several countries. I set the Key property of each picture in the ImageList to a unique value and created a description of each image in their respective Tag properties. Also, youll see the following code in each of the command buttons that loop through the images: |
|
|
|
 |
|
|
|
|
Private Sub cmdNext_Click()
Set imgFlag.Picture = _
ilsFlags.ListImages(mintIndex).Picture
mintIndex = mintIndex + 1
If mintIndex > ilsFlags.ListImages.Count Then
mintIndex = 1
End If
End Sub
Private Sub cmdPrev_Click()
Set imgFlag.Picture = _
ilsFlags.ListImages(mintIndex).Picture
mintIndex = mintIndex - 1
If mintIndex = 0 Then
mintIndex = ilsFlags.ListImages.Count
End If
End Sub |
|
|
|
|
|